package com.jiyun.controller;

import com.jiyun.pojo.ApplyFor;
import com.jiyun.service.ApplyForService;
import com.jiyun.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/applyfor")

public class ApplyForController {

    @Autowired
    ApplyForService applyForService;

    @RequestMapping("/addApply")
    public R addApply(@RequestBody ApplyFor applyFor){
        return applyForService.addApply(applyFor);
    }

    @RequestMapping("/findApplyfor")
    public R findApplyfor(){
        return applyForService.findApplyfor();
    }

    @RequestMapping("/deleteApply")
    public R deleteApply(Integer id){
        return applyForService.deleteApply(id);
    }
}
